********************************************************************************
* Turnout (individual level) 
********************************************************************************

use dataset_voters, clear

eststo clear
forvalues y = 2000(4)2016 {
	gen turnout`y' = turnout if year == `y'
	gen sy_ideologymodel`y' = sy_ideologymodel if year == `y'
	label variable turnout`y' "Turnout `y'"
	label variable sy_ideologymodel`y' "Ideology `y'"
}
estpost summarize turnout2* sy_ideologymodel2*

#delimit;

esttab
	using "_output/tableA1a.tex"
	, 
		replace
		booktabs
		compress 
		unstack 
		cells("count(fmt(%20.0fc))
			mean(fmt(%20.02fc)) sd(fmt(%20.02fc))")
		noobs
		label
		width(\linewidth)
		nonum
		nomtitles
		collabels("Observations" "Mean" "Standard Deviation")
		;
		
#delimit cr

********************************************************************************
* Contributions (individual level) 
********************************************************************************

use dataset_donors, clear

forvalues y = 2000(2)2014 {
	gen ltotamount`y' = ltotamount if year == `y'
	gen ltotrep`y' = ltotrep if year == `y'
	gen ltotdem`y' = ltotdem if year == `y'
	label variable ltotamount`y' "Log total contributions `y'"
	label variable ltotrep`y' "Log total to Republicans `y'"
	label variable ltotdem`y' "Log total to Democrats `y'"
}

eststo clear
estpost summarize ltotamount2* ltotrep2* ltotdem2*

#delimit;

esttab
	using "_output/tableA1b.tex"
	, 
		replace
		booktabs
		compress 
		unstack 
		cells("count(fmt(%20.0fc))
			mean(fmt(%20.02fc)) sd(fmt(%20.02fc))")
		noobs
		label
		width(\linewidth)
		nonum
		nomtitles
		collabels("Observations" "Mean" "Standard Deviation")
		;
		
#delimit cr

********************************************************************************
* End
********************************************************************************
